home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 1 (Walnut Creek)
/
Aminet - June 1993 [Walnut Creek].iso
/
ab20
/
aplictns
/
analyplt.doc
< prev
next >
Wrap
Text File
|
1991-10-08
|
3KB
|
55 lines
AnalyRIM's PLOT function
AnalyRIM has a primitive designed to allow it to cooperate with a plotting
program such as GnuPLOT to plot data from the spreadsheet on whatever
output devices the plot program handles (which for GnuPLOT are many!).
This is handled by a command PL which plots one or two ranges (depending
on whether you want to plot only Y coordinates or both X and Y coordinates)
and a convention to allow title and the like information to be passed.
The command added is
PL v1:v2,v3:v4;systemcommand
and the action is the following:
The first range v1:v2 must be a cell range (horizontal, vertical or
page) which corresponds to the X coordinates to plot if the v3:v4
argument exists, or which corresponds to the Y coordinates if
not. The second range, if present, must be another legal range
(in any direction). Both ranges must be one dimensional and
should be the same length if both are present.
AnalyRim will produce a file named "pccplt.dat" in the default
directory containing the values of the cells in the one or two
ranges, either one value per line (if only v1:v2 is in the
command) or two values per line (if both exist) so that the
lines each contain one point to be plotted. This is the format
GnuPlot (among others) want.
In addition, the contents of the FORMULAS for accumulators X,
Y, and Z will be placed in a file "titleinfo.txt" also in the default
directory. These may be used to pass titles, commands to format the
plot, or whatever. In the case of GnuPLOT, even a "load" command may
be placed here to do fancier formatting using some other predefined
file. The first 80 characters of each formula are copied without
further examination.
Once these files are created (and closed), AnalyRIM executes a command
which is either the "systemcommand" part of the PL command, or which
defaults to the command @DK:PLTFIL.PCP on VMS, to EXECUTE DK:PLTFIL.PCP
on AmigaDos, and to the command /DK/PLTFIL.PCP in Unix. The system
command part can be whatever syntax is desired, but will generally be a
script which will run the plot program and get it to read the data (and
possibly title information) and produce a plot. The plot output and
format may be controlled by the input passed to the plot program.
The reason the X, Y, and Z accumulator formulae don't have any pre-added
text is to allow this text to be placed in the accumulator.
It is expected that for actual use, a command file to AnalytiCalc
will be devised to be activated by a function key, and that this file
will cause title information to be placed in the X/Y/formulae and
will select the range(s) to be plotted and the style of the plot.
By moving this functionality to a separate program, AnalyRIM avoids
having to duplicate work already available, yet permits plotting to
be done (once some setup is done) as conveniently as if the plotting
code were linked in.